<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<%
    request.setAttribute("contextPath", request.getContextPath());
    
%>
<html>
<head>
<title>listPurchaseHistory</title>
</head>
<body>
  <div align="center">您购买过的图书</div>
  <table width="80%" border="1" align="center">
    <tr>
        <td>图书名称</td>
        <td>作者</td>
        <td>出版社</td>
        <td>价格</td>
    </tr>
    <c:forEach items="${purchaseHistorys}" var="u">
    <tr>
        <td>${u.bookName}</td>
        <td>${u.bookAuthor}</td>
        <td>${u.bookPub}</td>
        <td>${u.bookPrice}</td>
    </tr>
    </c:forEach>
  </table>
  <br>
  <br>
  <a href="${contextPath}/profile/index"><div align="center" style="color:#F00">返回首页</div></a>
</body>
</html>